import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/about",
    name: "About",
    component: () => import(/* webpackChunkName: "about" */ "../pages/About.vue")
  },
  {
    path: "/",
    name: "Login",
    component: () => import("../pages/login/login.vue")
  },
  {
    path: "/index",
    name: "index",
    component: () => import("../pages/index/index.vue")
  },
  {
    path: "*",
    name: "error",
    component: () => import("../pages/error/404.vue")
  }
];

const router = new VueRouter({
  routes
});

export default router;
